<template>
	<view class="item" >
		<uv-image src="https://linshitong.oss-cn-shenzhen.aliyuncs.com/dev/image/2025/0813/442f1202508130941174094.png"  width="75" height="75" />
		<view style="margin-left: 30rpx;">
			<uv-text text="果乐多" size="30rpx" color="#333" bold />
	
			<template v-if="item !== 1">
				<uv-gap height="10" bgColor="transparent" />
				<view class="flex align-center">
					<uv-text text="5分" size="24rpx" color="#E59B37" class="uv-text-init" />
					<uv-text text="月售100+" size="24rpx" color="#717171" class="uv-text-init" style="margin-left: 10rpx;" />
				</view>
				<uv-gap height="10" bgColor="transparent" />
				<view class="flex align-center">
					<uv-text text="起送￥1" size="24rpx" color="#717171" class="uv-text-init" />
					<uv-text text="配送￥2" size="24rpx" color="#717171" class="uv-text-init" style="margin-left: 6rpx;" />
				</view>
			</template>
			
			<template v-if="item == 1">
				<uv-gap height="6" bgColor="transparent" />
				<view class="address" >靖江市平江路169号</view>
				<view class="flex align-center" >
					<uv-rate :count="5" v-model="rate" size="12" active-color="#E59D37" />
					<text class="rate">{{ rate.toFixed(2) }}</text>
				</view>
				<view class="flex align-center">
					<uv-text text="起送￥1" size="24rpx" color="#717171" class="uv-text-init" />
					<uv-text text="配送￥2" size="24rpx" color="#717171" class="uv-text-init" style="margin-left: 6rpx;" />
				</view>
			</template>
			
			<view class="goosd" v-if="item !== 1">
				<view class="item1">
					<uv-image src="https://linshitong.oss-cn-shenzhen.aliyuncs.com/dev/image/2025/0813/a9f65202508130941494869.png"  width="60" height="60" />
					<uv-gap height="5" bgColor="transparent" />
					<uv-text text="苹果" size="24rpx" color="#333333" />
					<view class="flex align-center">
						<uv-text text="￥0.01" size="24rpx" color="rgb(255 0 18)" class="uv-text-init" style="margin-right: 5rpx;" />
						<uv-text text="￥1" size="24rpx" color="#717171" decoration="line-through" class="uv-text-init" />
					</view>
				</view>
				<view class="item1">
					<uv-image src="https://linshitong.oss-cn-shenzhen.aliyuncs.com/dev/image/2025/0813/a9f65202508130941494869.png"  width="60" height="60" />
					<uv-gap height="5" bgColor="transparent" />
					<uv-text text="苹果" size="24rpx" color="#333333" />
					<view class="flex align-center">
						<uv-text text="￥0.01" size="24rpx" color="rgb(255 0 18)" class="uv-text-init" style="margin-right: 5rpx;" />
						<uv-text text="￥1" size="24rpx" color="#717171" decoration="line-through" class="uv-text-init" />
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script setup>
	import { ref } from 'vue'
	
	defineProps({
		item: {
			type: Number,
			default: 1
		}
	})
	const rate = ref(5.00)
</script>

<style lang="scss" scoped>
	.item {
		display: flex;
		margin-bottom: 30rpx;
		padding: 30rpx;
		border-radius: 20rpx;
		background-color: #fff;
	}
	.goosd {
		display: grid;
		grid-gap: 30rpx;
		grid-template-columns: repeat(3, 1fr);
		margin-top: 20rpx;
	}
	.rate {
		color: #E59D37;
		font-size: 28rpx;
	}
	.address {
		color: #333333;
		font-size: 20rpx;
	}
</style>